/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.thienloc.omap.controller;

import com.thienloc.omap.util.JsfUtil;
import javax.faces.bean.ManagedProperty;

/**
 *
 * @author GiangLT
 */
public abstract class BaseBean {

    @ManagedProperty(value = "#{sessionBean}")
    protected SessionBean sessionBean;

    public String getUsername() {
        return sessionBean.getOmapUser().getUsername() + "-" + JsfUtil.getClientIp();
    }

    public SessionBean getSessionBean() {
        return sessionBean;
    }

    public void setSessionBean(SessionBean sessionBean) {
        this.sessionBean = sessionBean;
    }
}
